#include"heap.h"

void test1()
{
	Hp x;
	int Data[8] = { 2,4,1,6,8,7,3,5 };
	HpInit(&x,Data,sizeof(Data)/sizeof(int));
	HpPrintf(x.a, x.size);
	HpPush(&x, 0);
	HpPrintf(x.a, x.size);
	HpPop(&x);
	HpPrintf(x.a, x.size);
	HpPop(&x);
	HpPrintf(x.a, x.size);
	HpPop(&x);
	HpPrintf(x.a, x.size);
	HpPop(&x);
	HpPrintf(x.a, x.size);
	HpPop(&x);
	HpPrintf(x.a, x.size);
	HpPop(&x);
	HpPrintf(x.a, x.size);
}

void test2()
{
	int Data[8] = { 2,4,1,6,8,7,3,5 };
	HpSort(Data, sizeof(Data) / sizeof(int));
	HpPrintf(Data, sizeof(Data) / sizeof(int));
}

int main()
{
	//test1();
	test2();
}